/**
 * 
 */
package net.synck.gcontacts.views;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

import com.google.gdata.data.contacts.ContactFeed;

public class ViewContentProvider implements IStructuredContentProvider {
	
	
	public void inputChanged(Viewer v, Object oldInput, Object newInput) {
		//System.out.println("input changed; new " + newInput + " old " + oldInput);
	}
	
	public void dispose() {
	
	}
	
	public Object[] getElements(Object parent) {		
		System.out.println("get elements from " + parent);
		if (parent instanceof ContactFeed) {
			ContactFeed feed = (ContactFeed)parent;
			return feed.getEntries().toArray();
		} else {
			return new ContactFeed[] {};
		
		}
		
	}
}